import { useTranslation } from "react-i18next";
import { BasicColumn, FormSchema, BasicTable, useTable } from "@/components/Table";

const index = () => {
	const { t } = useTranslation();
	const searchFormSchema_II: FormSchema[] = [
		{
			label: t("kevin_ui.from_date"),
			field: "from_date",
			component: "DatePicker"
		},
		{
			label: t("kevin_ui.to_date"),
			field: "to_date",
			component: "DatePicker"
		},
		{
			label: t("kevin_ui.department"),
			field: "department",
			component: "Select"
		}
	];
	const columns: BasicColumn[] = [
		{
			title: t("patientBasic.patient_id"),
			dataIndex: "patientId"
		},
		{
			title: t("patientBasic.full_name"),
			dataIndex: "fullName"
		},
		{
			title: t("patientBasic.birthyear"),
			dataIndex: "birthday"
		},
		{
			title: t("patientBasic.pat_type"),
			dataIndex: "patType"
		},
		{
			title: t("patientBasic.age"),
			dataIndex: "age"
		},
		{
			title: t("patientBasic.gender"),
			dataIndex: "gender"
		},
		{
			title: t("patientBasic.pat_address"),
			dataIndex: "address"
		},
		{
			title: t("patientBasic.occupation"),
			dataIndex: "occupation"
		},
		{
			title: t("patientBasic.ethnicity"),
			dataIndex: "ethnicity"
		}
	];

	const [patServicesTable] = useTable({
		dataSource: [
			{
				patientId: "3123awsdad",
				fullName: "Jack",
				birthday: "2025-01-23",
				gender: "male",
				patType: "1",
				patCardno: "55555",
				age: 23,
				address: "13wdfawfafa",
				occupation: "dawd",
				ethnicity: "gkw"
			}
		],
		columns,
		useSearchForm: true,
		formConfig: {
			labelWidth: 120,
			schemas: searchFormSchema_II,
			showActionButtonGroup: true
		}
	});
	return (
		<div className="patient_status_summary">
			<BasicTable register={patServicesTable}></BasicTable>
		</div>
	);
};
export default index;
